package com.cloudbroker.bcs.platform.dav.middle.service.impl;

import com.cloudbroker.bcs.platform.dav.middle.dao.BrokerVoteLogDao;
import com.cloudbroker.bcs.platform.dav.middle.dao.base.TenantDAOBase;
import com.cloudbroker.bcs.platform.dav.middle.entity.BrokerVoteLog;
import com.cloudbroker.bcs.platform.dav.middle.service.BrokerVoteLogService;
import com.cloudbroker.bcs.platform.dav.middle.service.base.TenantServiceImplBase;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * Created by wangxu13798 on 2016/10/26.
 */
@Service
public class BrokerVoteLogServiceImpl extends TenantServiceImplBase<BrokerVoteLog,Long> implements BrokerVoteLogService{
    @Resource
    private BrokerVoteLogDao brokerVoteLogDao;

    @Override
    protected TenantDAOBase<BrokerVoteLog, Long> getDAO() {
        return brokerVoteLogDao;
    }

    @Override
    public Integer dayVoteFlag(String openid,Integer tenant_id,String vote_type, Date vote_time) {
        return brokerVoteLogDao.dayVoteFlag(openid,tenant_id,vote_type,vote_time);
    }

    @Override
    public List<BrokerVoteLog> findBrokerVoteToday(String openId, Integer tenant_id, Date vote_time,String vote_type) {
        return brokerVoteLogDao.findBrokerVoteToday(openId,tenant_id,vote_time,vote_type);
    }
}
